import React from 'react';
import { HashRouter, Redirect, Route, Switch } from 'react-router-dom';
import CityList from './pages/CityList/index';
import Home from './pages/Home/index';
import MyMap from './pages/MyMap';
import Notfound from './pages/Notfound';

export default function App() {
  return (
    <HashRouter>
      <Switch>
        <Route exact path='/' render={() => <Redirect to='/home' />} />
        <Route path='/home' component={Home} />
        <Route path='/cityList' component={CityList} />
        <Route path='/map' component={MyMap} />
        <Route path='*' component={Notfound} />
      </Switch>
    </HashRouter>
  );
}
